import { get, post } from './request'
import type { CommentsPage,CommentsAdd } from '@/config/data/data'
import type { Result, ResultPageComments } from '@/config/data/result'

//评论--根据文章id分页查询评论
export const reqPageById = (
  data: CommentsPage
): Promise<Result<ResultPageComments[]>> => get('/comments/page', data)

/** 评论--新增 */
export const reqCommentsInsert = (
  data: CommentsAdd
): Promise<Result<null>> => post('/comments/insert', data)
